const mongoose = require("./baseDB/db");
//2.在本地定义一个Schema和远程数据库的字段映射
var articleSchema = new mongoose.Schema({
    date:String,
    title:String,
    imgSrc:String,
    avatar:String,
    content:String,
    reading:Number,
    collections:Number,
    headImgSrc:String,
    dateTime:String,
    detail:String,
    postId:Number,
    music:{
        url:String,
        title:String,
        coverImg:String,
    },
    collected:Boolean,
});
// 3.创建数据模型，操作数据库
var ArticleModel = mongoose.model("article",articleSchema,"article");  //是我们获取的数据库里Top250的那张表
module.exports = ArticleModel;